package com.gymjournal

class User {
    static hasMany = [trainings: Training]

    String userName
    Set<Training> trainings

    static constraints = {
        userName(unique: true, nullable: false)

    }

    @Override
    String toString() {
        userName
    }
}
